﻿using System.Collections.Generic;

namespace Sandy.Selectors
{
    // Path: client.Family("name")
    public class FamilySelector : IFamilySelector
    {
        private readonly SandyClient _client;
        private readonly SandyFamily _family;

        internal FamilySelector(SandyClient client, SandyFamily family)
        {
            _client = client;
            _family = family;
        }

        public ColumnGetSelector this[string key]
        {
            get
            {
                return new ColumnGetSelector(_client, _family, key);
            }
        }

        public RangeColumnSelector this[IEnumerable<string> keys]
        {
            get
            {
                return new RangeColumnSelector(_client, _family, keys);
            }
        }

        public RangeColumnSelector this[params string[] keys]
        {
            get
            {
                return this[(IEnumerable<string>) keys];
            }
        }

        public RangeColumnSelector this[KeyRange keys]
        {
            get
            {
                return new RangeColumnSelector(_client, _family, keys);
            }
        }
    }
}